package com.example.booksystem.demos.web.controller;

import com.example.booksystem.demos.web.model.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.booksystem.demos.web.service.bookService;


import java.util.List;

@RestController
@RequestMapping("/book")
public class bookController {

    //private bookService service = new bookService();
    @Autowired
    private bookService service;
    @RequestMapping("/getBookList")
    List<Book> getBookList(){
        List<Book> list = service.getBookList();
        return list;
    }


}
